import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from flaskapp import create_app, register_blueprint,db
from flask_cors import CORS

app = create_app()
# CORS(app, resources={r"/chat/*": {"origins": "*"}}, supports_credentials=True)
CORS(app, resources={r"/*": {"origins": "*"}}, supports_credentials=True)

@app.route('/')
def hello_world():
    return 'Hello World!'


# @app.before_request
# def before_request():
#     get_novel(index_url)


if __name__ == '__main__':
    print(app.url_map)
    app.run()